package com.learn.databinding.workwithobservabledataobjects.model

import androidx.databinding.ObservableField

/**
 * 数据类
 * 需要动态更新的字段使用ObservableXXX类型
 */
class User {
    val firstName = ObservableField<String>()
    val lastName = ObservableField<String>()
    val age = ObservableField<Int>()
}

/**
 * 常量类
 * 方便访问字面量的
 */
class Fields {
    companion object {
        @JvmField
        val FIRST_NAME: String = "firstName"

        @JvmField
        val LAST_NAME: String = "lastName"

        @JvmField
        val AGE: String = "age"
    }
}